<?php

namespace app\command;

use app\admin\model\Channel;
use app\admin\model\Custom;
use app\admin\model\Maint;
use app\admin\model\Member;
use app\admin\model\Other;
use app\admin\model\Project;
use app\admin\model\ProjectModel;
use app\admin\model\Taobao;
use app\api\model\MemberVipCard;
use think\console\Command;
use think\console\Input;
use think\console\Output;

class UpdateUser extends Command
{
    protected function configure()
    {
        // 指令配置
        $this->setName('UpdateUser');
        // 设置参数
        $this->setDescription('解除用户封禁状态')->setHelp("php think UpdateUser");
    }

    protected function execute(Input $input, Output $output)
    {
        $output->writeln('开始执行');
        $map[] = ['status','=',0];
        $map[] = ['expire_time','<',time()];
        (new Member())->where($map)->update(['status' => 1,'update_time' =>time(),'expire_time'=>'']);
        $output->writeln('结束执行');

    }
}